package com.pojo;
import lombok.Data;

@Data
public class Result {
    private Boolean flag;
    private String message;
    private Object data;

    public static Result success(String message){
        Result result = new Result();
        result.setFlag(true);
        result.setMessage(message);
        return result;
    }
    public static Result success(String message,Object data){
        Result result = new Result();
        result.setFlag(true);
        result.setMessage(message);
        result.setData(data);
        return result;
    }
    public static Result fail(String message){
        Result result = new Result();
        result.setFlag(false);
        result.setMessage(message);
        return result;
    }
}
